package com.godofgamblers.hotelmanagementsystem.handler;

import com.godofgamblers.hotelmanagementsystem.pojo.CommentPage;
import com.godofgamblers.hotelmanagementsystem.service.CommentTextService;
import com.godofgamblers.hotelmanagementsystem.service.RoleService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Data
@Controller
public class CommentPageHanlder {
    @Autowired
    private CommentTextService commentTextService;
    @Autowired
    private RoleService roleService;
    @RequestMapping("/commentPage")
    @ResponseBody
    public CommentPage commentPage(int currentPage, HttpServletRequest request){
           CommentPage commentPage = new CommentPage();
           request.getSession().setAttribute("currentPage", currentPage);
           return commentPage;
    }

}